﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Linq.Expressions;

namespace Htse.Blue.Logic.Validation
{
	public interface IValidationDictionary<TModel> where TModel : class
	{
		/// <summary>
		/// Add an error to the validation dictionary for the specified key showing the specified error message
		/// </summary>
		/// <param name="key">The key for the error</param>
		/// <param name="errorMessage">The error message to show</param>
		/// <returns></returns>
		IValidationDictionary<TModel> AddError(string key, string errorMessage);

		/// <summary>
		/// Add an error to the validation dictionary for the specified pair of keys showing the specified error message
		/// </summary>
		/// <param name="key1">The first key for the error</param>
		/// <param name="key2">The second key for the error</param>
		/// <param name="errorMessage">The error message to show</param>
		/// <returns></returns>
		IValidationDictionary<TModel> AddError(string key1, string key2, string errorMessage);

		/// <summary>
		/// Get the state of the validation dictionary
		/// </summary>
		bool IsValid { get; }
	}
}
